package classes.Staff;

import db.Jdbc;

/**
 * @Auther: 程嘉明
 * @Date: 2018/8/22/022 15:38
 * @Description:经理类
 */
public class Manager extends Staff {
    public Manager(String ID, String GDBS, String ZJLX, long ZJHM,int RYLB,String NAME,int SEX,String NATION,String NATLIVEPLACE,String WHCD,String PASS) throws Exception {
        super(ID,GDBS,ZJLX,ZJHM,RYLB,NAME,SEX,NATION,NATLIVEPLACE,WHCD,PASS);
        Jdbc.getConnection();
        //创建一个对象时就在数据库中加入一条记录
        String sql="insert into t_gdryjbxx values('"+ID+"','"+GDBS+"','"+ZJLX+"','"+ZJHM+"','"+RYLB+"','"+NAME+"','"+SEX+"','"+NATION+"','"+NATLIVEPLACE+"','"+WHCD+"','"+PASS+"'); ";
        Jdbc.stat.executeUpdate(sql);
        sql="insert into salary values('"+ID+"',5000,2000,0,0,7000);";//插入基本工资
        Jdbc.stat1.executeUpdate(sql);
    }
}
